package message.types.none;

import java.io.IOException;

import message.Message;
import network.e2e.FrameReader;
import network.e2e.FrameWriter;
import stalker.Stalker;

public abstract class CleanMessage extends Message {

  /**
   * Constructs a get last data request
   * @requires parameters not null
   * @param client request originator
   * @param destination the target
   */
  public CleanMessage(Stalker client, Stalker destination) {
    super(client, destination);
  }
  
  /**
   * Constructs a get last data request from the net
   * @requires parameters not null
   * @param client request originator
   * @param destination the target
   * @param reader the net
   */
  public CleanMessage(Stalker client, Stalker destination, FrameReader reader) {
    super(client, destination);
    assert reader != null;
  }
  
  public boolean contentEquals(Object obj) {
    if (!(obj instanceof CleanMessage)) {
      return false;
    }
    CleanMessage that = (CleanMessage) obj;
    return this.getClient().equals(that.getClient()) &&
           this.getDestination().equals(that.getDestination());
  }

  @Override
  public void send(FrameWriter writer) throws IOException {
    return;
  }

}
